// 任务分解接口
import request from "@/utils/request";

/**查询 */
export function listTask(params) {
  return request({
    url: "/system/delivery/list",
    method: "get",
    params,
  });
}

//新增
export function addTask(data) {
  return request({
    url: "/system/delivery",
    method: "post",
    data,
  });
}
//修改
export function editTask(data) {
  return request({
    url: "/system/delivery",
    method: "put",
    data,
  });
}
//详情
export function detailTaskDeco(ids) {
  return request({
    url: `/system/delivery/${ids}`,
    method: "get",
  });
}
//删除
export function deleteTask(ids) {
  return request({
    url: `/system/delivery/${ids}`,
    method: "delete",
  });
}
//详情
export function detailTask(id) {
  return request({
    url: `/system/delivery/examine/${id}`,
    method: "get",
  });
}
//下发
export function sendTask(data) {
  return request({
    url: "/system/delivery/issue",
    method: "post",
    data,
  });
}
//详情
export function detailFillTask(id) {
  return request({
    url: `/system/filling/${id}`,
    method: "get",
  });
}
//确认完成
export function finishFillTask(data) {
  return request({
    url: `/system/filling/confirm`,
    method: "post",
    data,
  });
}

//获取安全-任务分解详细信息
export function getTask(id) {
  return request({
    url: `/system/delivery/${id}`,
    method: "get",
  });
}
